package com.cx.service.impl;

import com.cx.mapper.UsersMapper;
import com.cx.pojo.Users;
import com.cx.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private UsersMapper usersMapper;


    @Override
    public Users selectByNameAndPwd(String userName, String userPwd) {
        return usersMapper.selectByNameAndPwd(userName,userPwd);
    }

    @Override
    public Users checkUser(String username, String password) {
        return usersMapper.selectByNameAndPwd(username,password);
    }

    @Override
    public Users selectByName(String userName) {
        return usersMapper.selectByName(userName);
    }


}
